package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/*
 * @author zzr
 * @date: 2025/04/13  17:29
 * @description:
 */
public class IODemo9 {
    public static void main(String[] args) {

        // 使用 OutputStream 来写文件
        try (OutputStream outputStream = new FileOutputStream("./test.txt", true)) {
            byte[] buffer = new byte[] {97, 98, 99, 100, 101, 102};
            outputStream.write(buffer);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
